ABOUTDEVELOPERS |
SpatialStream® Code Examples
Adding WMS Layer
When managing map layers, each layer's style definitions are contained in a separate xml file called an SLD, or Stylized Layer Descriptor. The SLD is an xml file that is used in GetMap requests and it contains the style parameters for a layer to be displayed on a map (color, opacity, angle, size). The example below shows how to display parcel lines through a Tile Layer and APN labels with an SLD. Using the WMS layer in Leaflet requires a plugin that can be downloaded here. Plugin SLD | GetMap
labelLayer = new L.NonTiledLayer.WMS(Dmp.Env.Connections["SS"].getBaseUrl() + 'GetMap.aspx?', {
minZoom: 16, maxZoom: 18, sld: "samplesite.dmp.Styles.Parcels/Labels.sld.xml", layers:'samplesite.dmp/parcels', crs: L.CRS.EPSG4326, format: 'image/png' Run Sample Back To Index |